//
// ViewPlane.cpp for  in /home/herpec_j/Dropbox/Projets/raytracer-2016/Sources/World/
//
// Made by Jonathan
// Login   <ledey_l@epitech.net>
//
// Started on  Tue Sep 24 20:23:52 2013 Jonathan
// Last update Tue Sep 24 20:28:55 2013 Jonathan
//

#include		"World/ViewPlane.hpp"

namespace		World
{
  ViewPlane::ViewPlane(void) : mHorizontalResolution(640), mVerticalResolution(480), mPixelSize(1.0), mSamplesPerPixels(1), mGamma(1.0), mInvGamma(1.0), mShowOutOfGamut(false)
  {
    return;
  }

  ViewPlane::ViewPlane(ViewPlane const &rOther) : mHorizontalResolution(rOther.mHorizontalResolution), mVerticalResolution(rOther.mVerticalResolution), mPixelSize(rOther.mPixelSize), mSamplesPerPixels(rOther.mSamplesPerPixels), mGamma(rOther.mGamma), mInvGamma(rOther.mInvGamma), mShowOutOfGamut(rOther.mShowOutOfGamut)
  {
    return;
  }

  ViewPlane		&ViewPlane::operator=(ViewPlane const &rOther)
  {
    if (this != &rOther)
      {
	mHorizontalResolution = rOther.mHorizontalResolution;
	mVerticalResolution = rOther.mVerticalResolution;
	mPixelSize = rOther.mPixelSize;
	mSamplesPerPixels = rOther.mSamplesPerPixels;
	mGamma = rOther.mGamma;
	mInvGamma = rOther.mInvGamma;
	mShowOutOfGamut = rOther.mShowOutOfGamut;
      }
    return (*this);
  }

  void			ViewPlane::SetHorizontalResolution(unsigned short rHorizontalResolution)
  {
    mHorizontalResolution = rHorizontalResolution;
  }

  void			ViewPlane::SetVerticalResolution(unsigned short rVerticalResolution)
  {
    mVerticalResolution = rVerticalResolution;
  }

  void			ViewPlane::SetPixelSize(long double rPixelSize)
  {
    mPixelSize = rPixelSize;
  }

  void			ViewPlane::SetSamplesPerPixels(unsigned short rSamplesPerPixels)
  {
    mSamplesPerPixels = rSamplesPerPixels;
  }

  void			ViewPlane::SetGamma(long double rGamma)
  {
    mGamma = rGamma;
    mInvGamma = 1.0 / rGamma;
  }

  void			ViewPlane::SetShowOutOfGamut(bool rShowOutOfGamut)
  {
    mShowOutOfGamut = rShowOutOfGamut;
  }

  ViewPlane::~ViewPlane(void)
  {
    return;
  }
};
